var express = require('express');
var router = express.Router();
const user=require('../dao/users_dao')
const student = require("../dao/student_dao");
/* GET users listing. */
router.get('/', function(req, res, next) {
  res.send('respond with a resource');
});

router.post('/login', function(req, res, next) {
user.Login(req,res)
});
router.get('/getUserDataByToken',function (req,res) {
  user.getUserDataByToken(req,res)
})
router.get('/getUsersByTypePage',function (req,res) {
  user.getUsersByTypePage(req,res)
})
router.get('/delUserdata',function (req,res) {
  if (req.query.u_id==0) res.send("您不能删除管理员")
  else   user.delUserdata(req,res)
})
router.post('/upUserdata',function (req,res) {
  user.upUserdata(req,res)
})
/**
 * ******************修改个人信息************************
 */
/**
 * 获取所有今日超过37.5高危人群
 */
router.get('/getHotTmp', function(req, res) {
  user.getHotTmp(req, res)
})

router.post('/upPwd',function (req,res) {
  user.upPwd(req,res)
})
module.exports = router;
